﻿/***********************************************************************
 * <copyright file="AccountBalanceEntity.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   ThangND
 * Email:    thangnd@buca.vn
 * Website:
 * Create Date: 13 March 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.BussinessVoucher
{
    /// <summary>
    /// AccountBalanceEntity
    /// </summary>
    public class AccountBalance : BusinessObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AccountBalanceEntity"/> class.
        /// </summary>
        public AccountBalance()
        {
         //   AddRule(new ValidateRequired("BalanceDate"));
         //   AddRule(new ValidateRequired("CurrencyCode"));
            AddRule(new ValidateRequired("AccountNumber"));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AccountBalanceEntity"/> class.
        /// </summary>
        /// <param name="accountBalanceId">The account balance identifier.</param>
        /// <param name="balanceDate">The balance date.</param>
        /// <param name="currencyCode">The currency code.</param>
        /// <param name="exchangeRate">The exchange rate.</param>
        /// <param name="accountNumber">The account number.</param>
        /// <param name="movementDebitAmountOC">The movement debit amount oc.</param>
        /// <param name="movementDebitAmountExchange">The movement debit amount exchange.</param>
        /// <param name="movementCreditAmountOC">The movement credit amount oc.</param>
        /// <param name="movementCreditAmountExchange">The movement credit amount exchange.</param>
        /// <param name="budgetChapterCode">The budget chapter code.</param>
        /// <param name="budgetCategoryCode">The budget category code.</param>
        /// <param name="budgetSourceCode">The budget source code.</param>
        /// <param name="budgetItemCode">The budget item code.</param>
        /// <param name="customerId">The customer identifier.</param>
        /// <param name="vendorId">The vendor identifier.</param>
        /// <param name="employeeId">The employee identifier.</param>
        /// <param name="accountingObjectId">The accounting object identifier.</param>
        /// <param name="mergerFundId">The merger fund identifier.</param>
        /// <param name="bankId">The bank identifier.</param>
        /// <param name="projectId">The project identifier.</param>
        public AccountBalance(int accountBalanceId, DateTime balanceDate,  string accountNumber, decimal movementDebitAmountOC,
            decimal movementCreditAmountOC,  int? customerId, int? vendorId, int unitId) 
            : this()
        {
            AccountBalanceId = accountBalanceId;
            BalanceDate = balanceDate;

            AccountNumber = accountNumber;

            MovementCreditAmountOC = movementCreditAmountOC;

            MovementDebitAmountOC = movementDebitAmountOC;

            CustomerId = customerId;
            VendorId = vendorId;

            UnitId = unitId;
        }
        /// <summary>
        /// Gets or sets the reference identifier.
        /// </summary>
        /// <value>
        /// The reference identifier.
        /// </value>
        public long UnitId { get; set; } 
        /// <summary>
        /// Gets or sets the account balance identifier.
        /// </summary>
        /// <value>
        /// The account balance identifier.
        /// </value>
        public int AccountBalanceId { get; set; }

        /// <summary>
        /// Gets or sets the balance date.
        /// </summary>
        /// <value>
        /// The balance date.
        /// </value>
        public DateTime BalanceDate { get; set; }

        

        /// <summary>
        /// Gets or sets the account number.
        /// </summary>
        /// <value>
        /// The account number.
        /// </value>
        public string AccountNumber { get; set; }

        /// <summary>
        /// Gets or sets the movement debit amount oc.
        /// </summary>
        /// <value>
        /// The movement debit amount oc.
        /// </value>
        public decimal MovementDebitAmountOC { get; set; }

        

        /// <summary>
        /// Gets or sets the movement credit amount oc.
        /// </summary>
        /// <value>
        /// The movement credit amount oc.
        /// </value>
        public decimal MovementCreditAmountOC { get; set; }

       


        /// <summary>
        /// Gets or sets the customer identifier.
        /// </summary>
        /// <value>
        /// The customer identifier.
        /// </value>
        public int? CustomerId { get; set; }

        /// <summary>
        /// Gets or sets the vendor identifier.
        /// </summary>
        /// <value>
        /// The vendor identifier.
        /// </value>
        public int? VendorId { get; set; }

        
    }
}
